package day14.com.zhiyou100;

// 枚举存储的都是常量值 枚举是一种类
public enum Week {

    Sunday(7),Monday(1),Tuesday(2),Wednesday(3),Thursday(4),Friday(5),Saturday(6);
    private Integer num;

    Week(Integer num) {
        System.out.println("Week");
        this.num = num;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public static void main(String[] args) {
        Week sunday = Week.Sunday;// Week.Sunday
        Integer num = sunday.getNum();
        System.out.println(num);//
    }

}
